package com.example.demo.model;

/**
 * @author hpp
 * @create 2021/9/14 - 16:51
 */
public class Result<T> {
    public static final String Smessage = "查询成功";
    public static final String Emessage = "查询失败";
    private Meta meta;
    /** 具体的内容. */
    private T data;
    /*构造函数*/
    public Result(Integer status,String msg, T data) {
        this.meta = new Meta(status,msg);
        this.data = data;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Meta getMeta() {
        return meta;
    }

    public void setMeta(Integer status,String msg) {
        this.meta = new Meta(status,msg);
    }
}
class Meta{
    /** 错误码. */
    private Integer status;

    /** 提示信息. */
    private String msg;
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Meta(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }
}
